﻿
using Fozzy.Object;
using System.Collections.Generic;
using System.Xml;

namespace Fozzy.Gedcom
{
    public class Continueds                                                 : Enumeration<XNode>
    {
        #region [ Declarations ]
        #endregion

        #region [ States ]
        #endregion

        #region Structure
        #endregion

        #region [ Proprietes ]
            private Selection                   Conts                       { get { return new Cont(Value)              ; } }
            private Selection                   Concs                       { get { return new Conc(Value)              ; } }
        #endregion

        #region [ Constructeur ]
            public Continueds(Fozzy.File file)                              : base(file)
            {}
        #endregion

            protected override void Prepare()
            {
                base.Prepare()                                                 ;
                //XmlDocument doc = new XmlDocument();
                //doc.Load(xmlFilePath);

                //// Get all nodes that contain child continue nodes.
                //XmlNodeList list = Value.SelectNodes("//CONT/.. | //CONC/..") ;
                //// Go through each node and append child continue nodes.
                //foreach (XmlNode node in list) AppendValues(node)             ;
                Extend()                                                        ;
                //// Write the updates to the file system.
                //doc.Save(xmlFilePath)                                         ;
                //???
                //Save()                                                          ;
            }

            private void Extend()
            { 
                Conts.Continuate()                                              ;
                Conts.Concatenate()                                             ;
            }

        }
    }
